package com.jjclub.beanStudy;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

import java.sql.SQLOutput;

/**
 * @Classname Cat
 * @Description TODO
 * @Date 2019/10/29 13:47
 * @Created by jq
 */
//@Component
public class Cat implements BeanPostProcessor{
    //在初始化之前执行
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("测试");
        return bean;
    }
    //在初始化之后执行
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("一次");
        return bean;
    }
}
